import request from '../utils/request'

// 登录
export function login(data) {
    return request({
        url: '/user/login',
        method: 'post',
        data: data
    })
}

export function listPageC1(data) {
    return request({
        url: '/user/listPageC1',
        method: 'post',
        data: data
    })
}

export function getFindByNo(query) {
    return request({
        url: '/user/findByNo',
        method: 'get',
        params: query
    })
}

export function findByNo(query) {
    return request({
        url: '/user/findByNo',
        method: 'get',
        params: query
    })
}

export function list() {
    return request({
        url: '/user/list',
        method: 'get',
    })
}

export function del(query) {
    return request({
        url: '/user/del',
        method: 'delete',
        params: query
    })
}

export function update(data) {
    return request({
        url: '/user/update',
        method: 'post',
        data: data
    })
}

export function save(data) {
    return request({
        url: '/user/save',
        method: 'post',
        data: data
    })
}

export function listPage(data) {
    return request({
        url: '/goods/listPage',
        method: 'post',
        data: data
    })
}

export function listStorage() {
    return request({
        url: '/storage/list',
        method: 'get',
    })
}

export function listGoodsType() {
    return request({
        url: '/goodstype/list',
        method: 'get',
    })
}

export function goodsDel(query) {
    return request({
        url: '/goods/delete',
        method: 'delete',
        params: query
    })
}

export function goodsUpdate(data) {
    return request({
        url: '/goods/update',
        method: 'post',
        data: data
    })
}

export function goodsSave(data) {
    return request({
        url: '/goods/save',
        method: 'post',
        data: data
    })
}

export function recordSave(data) {
    return request({
        url: 'record/save',
        method: 'post',
        data: data
    })
}

export function goodstypeListPage(data) {
    return request({
        url: '/goodstype/listPage',
        method: 'post',
        data: data
    })
}

export function goodstypeDelete(query) {
    return request({
        url: '/goodstype/delete',
        method: 'delete',
        params: query
    })
}

export function goodstypeUpdate(data) {
    return request({
        url: '/goodstype/update',
        method: 'post',
        data: data
    })
}

export function goodstypeSave(data) {
    return request({
        url: 'goodstype/save',
        method: 'post',
        data: data
    })
}

export function storageList() {
    return request({
        url: '/storage/list',
        method: 'get',
    })
}

export function goodstypeList() {
    return request({
        url: '/goodstype/list',
        method: 'get',
    })
}

export function recordListPage(data) {
    return request({
        url: '/record/listPage',
        method: 'post',
        data: data
    })
}

export function storageListPage(data) {
    return request({
        url: '/storage/listPage',
        method: 'post',
        data: data
    })
}

export function storageDelete(query) {
    return request({
        url: '/storage/delete',
        method: 'delete',
        params: query
    })
}

export function storageUpdate(data) {
    return request({
        url: '/storage/update',
        method: 'post',
        data: data
    })
}
export function storageSave(data) {
    return request({
        url: '/storage/save',
        method: 'post',
        data: data
    })
}

export function updatePassword(data) {
    return request({
        url: '/user/updatePassword',
        method: 'post',
        data: data
    })
}

export function charts() {
    return request({
        url: '/user/charts',
        method: 'get',
    })
}
// // 查询订单详情功能详细
// export function getDetail(id) {
//   return request({
//     url: '/order/detail/' + id,
//     method: 'get'
//   })
// }


// // 修改订单详情功能
// export function updateDetail(data) {
//   return request({
//     url: '/order/detail',
//     method: 'put',
//     data: data
//   })
// }

// // 删除订单详情功能
// export function delDetail(id) {
//   return request({
//     url: '/order/detail/' + id,
//     method: 'delete'
//   })
// }
